<style lang="less" scoped>
.error {
  &-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 450px;
    text-align: center;
  }

  // &-content {}

  &-image {
    width: 200px;
    min-height: 200px;
    img {
      display: block;
      width: 100%;
    }
  }

  &-message {
    padding: 30px 0;
    font-weight: 400;
    font-size: 18px;
    line-height: 25px;
    color: @color-secondary;
  }

  &-button {
    padding: 0 23px;
    height: 40px;
    border-radius: 2px;
    font-weight: 500;
    font-size: 18px;

    &, &:hover {
      background-color: @color-secondary;
      border-color: @color-secondary;
      color: @color-white;
    }

    &:hover {
      opacity: .85;
    }
  }
}
</style>

<template>
  <div class="page container error-page">
    <div class="error-content">
      <div class="error-image">
        <img src="~/assets/images/404.png" alt="">
      </div>

      <h1 class="error-message">
        抱歉！页面走丢了…
      </h1>

      <a-button
        size="large"
        class="error-button"
        @click="onReload"
      >
        刷新一下
      </a-button>
    </div>
  </div>
</template>

<script>
// import { mapState, mapMutations } from 'vuex'

// ref: https://nuxtjs.org/guide/views#error-page
export default {
  props: {
    error: {
      type: String,
      default: ''
    }
  },

  methods: {
    onReload () {
      location.reload()
    },
  },
}
</script>
